import matplotlib.pyplot as plt
import numpy as np
from scipy.stats import alpha

plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False

data1 = np.random.normal(0,1,1000)
data2 = np.random.normal(3, 1.5, 1000)

plt.figure(figsize=(10, 6))
plt.hist(data1, label='数据集1',  alpha=0.6)
plt.hist(data2, label='数据集2', alpha=0.6)

plt.title('多组直方图')
plt.xlabel('值')
plt.ylabel('频次')
plt.legend()
plt.show()